home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 278 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.1 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: John Max Skaller <maxtal@suphys.physics.su.oz.au>
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Give operator. a chance
  5. Date: 05 Feb 1996 09:25:34 PST
  6. Organization: MAXTAL
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <31140DF8.23A4@suphys.physics.su.oz.au>
  9. References: <3102AD11.1663@et.se> <4e0nc3$4dp@engnews1.eng.sun.com>
  10.         <4e90k4$gqr@hermes.synopsys.com> <u9pwc00wqn.fsf@yorick.cygnus.com>
  11. NNTP-Posting-Host: isolde.mti.sgi.com
  12. X-Original-Date: Sun, 04 Feb 1996 11:38:00 +1000
  13. X-Mailer: Mozilla 2.0b6a (WinNT; I)
  14. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  15.     iQBVAwUBMRY9l0y4NqrwXLNJAQEmRgH9HRgXOSNF8eDbMXed7fzFJHsEovDL/XIa
  16.     WR2eyR1MHxkuPlC2KCEHDPgm8thAHik8GGJWrLO3aNRNa6RedTLGSA==
  17.     =sBx0
  18. Originator: austern@isolde.mti.sgi.com
  19.  
  20. Jason Merrill wrote:
  21. > >>>>> Joe Buck <jbuck@Synopsys.COM> writes:
  22. > > Stroustrup proposes that operator. only forward to the resulting class
  23. > > for a.m if the object itself doesn't have a member m. 
  24.  
  25.     He did?
  26.  
  27.     Stroustrup actually proposed -- AND implemented and tested:
  28.  
  29.     struct X : *Y { .. };
  30.  
  31. which looked good to me. He said that programmers found it
  32. hard to use, however, and dropped it.
  33.  
  34. > I think a more natural way to achieve the delegation semantics proposed by
  35. > Stroustrup would be to extend 'using' along these lines:
  36. > struct A {
  37. >   void f  ();
  38. > };
  39. > struct ARef {
  40. >   A* a;
  41. >   using *a;
  42. > };
  43.  
  44.     I believe _I_ first proposed that. Again,
  45. it looks good on the surface but until precise details
  46. are given it isn't easy to see exactly what the
  47. consequences will be. As with deriving from 
  48. an expression (Bjarne's idea) it may just turn out
  49. to be to hard to use -- even if it works.
  50. -- 
  51. John Max Skaller               voice: 61-2-566-2189
  52. 81 Glebe Point Rd              fax:   61-2-660-0850
  53. GLEBE NSW 2037                 web: http://www.maxtal.com.au/~skaller/
  54. AUSTRALIA                      email: skaller@maxtal.com.au
  55. ---
  56. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  57.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy is
  58.   in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
  59.